An explanation will first be provided of a conventional method of setting a mechanical error correction quantity for mechanical axes which are not orthogonal to each other. FIG. 5(a) shows a grinding tool using a grindstone which moves up and down and which is displayed along a mechanical axis (Z axis) in a direction Z1 with an inclination of, e.g., 45.degree. relative to a horizontal mechanical axis (X axis) on which a workpiece is mounted. A coordinate system (Z1-X1) in the moving directions thereof is referred to as an actual or mechanical axis coordinate system, and thus the terms "mechanical axis" and "actual axis" are used interchangeably herein. However, machining work to be performed by the tool is expressed in terms of an orthogonal coordinate system, and hence a command is issued while (virtually) assuming an orthogonal coordinate system (axes Z2-X1 in FIG. 5(a)). This is referred to as a virtual orthogonal coordinate system. In the conventional system, the Z axis is set as an oblique moving axis for movement in the direction Z1, thereby attempting to obtain improved moving accuracy in the direction Z2 relative to the machining accuracy of the Z axis in the Z2 direction. For example, if it is presumed that the accuracy of the Z axis is 10 .mu.m in the Z1 direction, then the accuracy in the Z1 direction is improved since 10 .mu.m (Z2 direction).div..sqroot.2=7.071 .mu.m (Z1 direction). There is not, however, provided a gauge for measuring a mechanical error with respect to the inclined axis (i.e., Z1 direction). Rather, a gauge is provided for measuring a mechanical error with respect to an axis of the virtual orthogonal coordinate system (i.e., Z2 direction). Specifically, as shown in FIG. 5(a), a gauge 53 of, e.g., 10 mm stands vertically on an X-axis table 52. The mechanical axis Z is located at an origin position (point A). A micrometer provided at the tip of the Z axis is made to contact the gauge, and an indicator of the micrometer is set to 0 at this position. The mechanical axis Z is moved by, for example, 10.times..sqroot.2 mm (10 mm in the virtual orthogonal coordinate system direction Z2) in the direction Z1. The micrometer at the tip of the Z axis contacts the gauge at for example point B, thus reading an error representing the difference between the commanded amount of movement of the tool and the actual amount of movement of the tool. This error is converted by the operator into a mechanical error (gauge value.times..sqroot.2=mechanical error in the direction Z1) and is then set.
FIG. 5(b) shows a known lathe machine tool which comprises a horizontal axis (X axis) along which is disposed a tool 54 and a rotary axis (C axis) on which a workpiece is provided. The X and C axes are axes along which the tool actually moves. These two axes are simultaneously moved, and three axes are controllable by pseudo-creating a Y axis as if performing machining in a Y-axis direction of a machining work orthogonal coordinate system. With this arrangement it is possible to execute complicated machining with a simple construction. There is, however, no means for setting a mechanical error correction quantity for the pseudo Y axis. Hence, a high accuracy encoder 55 is set to the rotary axis, thus measurement-setting the mechanical error at constant angles.
FIG. 3(a) is a block diagram illustrating a conventional control system for effecting a pitch error correction. Referring to FIG. 3(a), the numeral 1 designates a command issued from a numerical control device (hereinafter referred to as a CNC device) to the tool; 2 represents a correction quantity setting means for setting a correction quantity for effecting a pitch error correction with respect to every axis; 4A represents a mechanical axis direction error storage means for storing the correction quantity of each axis set by the correction quantity setting means 2, and 6 represents a command converting means for converting the command 1 to a positional command (a). The positional command (a) is added to the output of the storage means 4A and the added result is output (b) controlling the tool.
FIG. 3(b) is a block diagram depicting a conventional control system for performing a backlash error correction. Referring to FIG. 3(b), the numeral 1 denotes a command issued from the CNC device to the tool; 2 represents a correction quantity setting means for setting the correction quantity for effecting the backlash error correction with respect to every axis; 4A represents a mechanical axis direction mechanical error storage means for storing the correction quantity set in setting means 2; 5 represents a direction reversing means for determining whether or not there is reversal along the mechanical moving axis; and 6 represents a command converting means for converting command 1 into a positional command (a). The stored correction quantity of each axis which is set by the correction quantity setting means 2 is added to each axis command issued to the tool (after the command is converted by converting means 6) and then output (b) to the tool. The mechanical error correction quantity is set with respect to the oblique axis in the same manner as described above in connection with FIG. 3(a) (i.e., the operator performs the conversion).
FIG. 4(a) shows a flowchart for the conventional control process of pitch error correction. Initially, in step 11, it is determined whether or not a command has issued from the CNC device. If it is determined that a command has issued, then it is determined in step 12 whether or not there exists a correction quantity for the axis concerned. If it is determined that the correction quantity is provided, then the correction quantity of each axis is added to the command of each axis (step 18), and the added result becomes an output to the tool. However, if it is determined in step 12 that there is no correction quantity ("N" in step 12), then each axis command is directly output to the tool (step 20).
FIG. 4(b) shows a flowchart for a conventional control process of backlash error correction. In step 11 it is determined whether or not a command has issued from the CNC device. If it is determined that the command has issued, then it is determined in step 12 whether or not there exists a correction quantity for the axis concerned. If it is determined in step 12 that there exists a correction quantity, then it is determined in step 15 whether or not the mechanical moving axis has reversed. During a direction reversion, the correction quantity of each axis is added to the command of each axis, and the added result is output to the tool (step 18). However, if it is determined that there is no correction quantity in step 12, then each axis command is directly output to the tool (step 20). Further, if it is determined in step 15 that there is no direction reversion, then each axis command is directly output to the tool.
The conventional mechanical error corrections (pitch error correction and backlash error correction) are executed in the manner discussed above. Accordingly, the grinding tool (in which the moving axes of the tool are not orthogonal to each other) includes no means for directly measuring the mechanical error of the oblique mechanical axes (e.g., direction Z1 in FIG. 5(a)). Rather, the mechanical error is measured in terms of the orthogonal axes (two or more virtual axes which are orthogonal to each other; e.g., axes Z2-X1 in FIG. 5(a)), and then the mechanical error is converted by the operator into a mechanical error correction quantity in terms of the actual mechanical axes. After this conversion, the mechanical error correction quantity is set. This conversion results in a conversion error. For example, suppose that the mechanical error in the virtual orthogonal coordinate system direction Z2 is 20 .mu.m in FIG. 5(a), and that the error is converted into a mechanical error on the actual mechanical axis Z (direction Z1). This conversion causes the mechanical error to become 20 .mu.m.times..sqroot.2=28.284 .mu.m (.theta.=45.degree.). The converted mechanical error value is then rounded-off resulting in the error value being set at 28 .mu.m. When reconverting this set error value into a mechanical error in terms of the virtual orthogonal coordinate system direction Z2, it follows that the accuracy degrades to 28 .mu.m.div..sqroot.2=19.798 .mu.m. Accordingly, a problem arises in that the grinding tool will not exhibit good accuracy as a result of the conversion error.
Further, there is no means in the conventional systems for setting the correction quantity of the mechanical error of a pseudo Y axis which, as illustrated in FIG. 5(b), is pseudo-created by the rotary axis C and the rectilinear axis X. Hence, a high-accuracy encoder is set at the center of the rotary axis, and the correction quantity is set by measuring the mechanical error at every constant angle. This leads to a problem in that the correction quantity in the vicinity of the center gets rough. For instance, when a correction pitch is set to 5.degree., the accuracy in the vicinity of the center is worse than at the end.
Japanese Patent Laid-Open Publication No. 282863/1987 discloses a method of converting a command expressed in terms of the virtual orthogonal coordinate system into a coordinate system in the mechanical axis direction. According to this method, a machining program expressed in terms of the virtual orthogonal coordinate system is first converted into the coordinate system in the mechanical axis direction, and then the command is given. However, this method is not used in determining the mechanical axis error correction.
Further, Japanese Patent Laid-Open Publication No. 21610/1989 discloses a correction method for an oblique-type tool. This method involves the steps of: inputting a tool diameter, decomposing it into components in the mechanical axis direction, adding the components to a moving distance and performing a pulse distribution. Accordingly, this method is not used as a correcting method for effecting the mechanical error correction on the mechanical axis (Z axis).